<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        

        var height = prompt('请输入您的身高(m)');
        var weight = prompt('请输入您的体重(kg)');
        var BIM = weight/Math.pow(height,2);
        if (BIM <18.5){
            alert('您的体重过轻.');
        }else if(BIM>=18.5 && BIM<24.5){
            alert('您的体重正常');
        }else if(BIM>=25 && BIM<28){
            alert('您的体重过重');
        }else if(BIM>=29 && BIM<32) {
            alert('您的体重肥胖');
        }else{
            alert('您的体重非常肥胖');
        }
    </script>
</body>
</html>